package com.hanserwei.han_picture.domain.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 用户
 */
@Schema(description = "用户")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "`user`")
public class User implements Serializable {

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "id")
    private Long id;

    /**
     * 账号
     */
    @TableField(value = "user_account")
    @Schema(description = "账号")
    private String userAccount;

    /**
     * 密码
     */
    @TableField(value = "user_password")
    @Schema(description = "密码")
    private String userPassword;

    /**
     * 用户昵称
     */
    @TableField(value = "user_name")
    @Schema(description = "用户昵称")
    private String userName;

    /**
     * 用户头像
     */
    @TableField(value = "user_avatar")
    @Schema(description = "用户头像")
    private String userAvatar;

    /**
     * 用户简介
     */
    @TableField(value = "user_profile")
    @Schema(description = "用户简介")
    private String userProfile;

    /**
     * 用户角色: user/admin
     */
    @TableField(value = "user_role")
    @Schema(description = "用户角色: user/admin")
    private String userRole;

    /**
     * 用户手机号
     */
    @TableField(value = "user_phone")
    @Schema(description = "用户手机号")
    private String userPhone;

    /**
     * 用户邮箱
     */
    @TableField(value = "user_email")
    @Schema(description = "用户邮箱")
    private String userEmail;

    /**
     * 用户生日
     */
    @TableField(value = "birthday")
    @Schema(description = "用户生日")
    private LocalDate birthday;

    /**
     * 编辑时间
     */
    @TableField(value = "edit_time")
    @Schema(description = "编辑时间")
    private LocalDateTime editTime;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    /**
     * 是否删除
     */
    @TableField(value = "is_delete")
    @Schema(description = "是否删除")
    @TableLogic
    private Integer isDelete;
}